package com.xiaoshuidi.cloud.framework.hangxin.core.service;

import com.xiaoshuidi.cloud.framework.hangxin.core.client.HangxinWebserviceClient;
import com.xiaoshuidi.cloud.framework.hangxin.core.dto.InvoicingReqDTO;
import com.xiaoshuidi.cloud.framework.hangxin.core.dto.InvoicingRespDTO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import javax.validation.Valid;

@Slf4j
@RequiredArgsConstructor
public class InvoiceServiceImpl implements InvoiceService {

    private final HangxinWebserviceClient aisionWebserviceClient;

    @Override
    public InvoicingRespDTO apply(@Valid InvoicingReqDTO reqDTO) {
        return aisionWebserviceClient.call(reqDTO);
    }

    @Override
    public InvoicingRespDTO query(String taxPayerId, String authCode, String seqNo) {
        return aisionWebserviceClient.query(taxPayerId, authCode, seqNo);
    }

}
